//
//  CertificationTopViewTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/7.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "CertificationTopViewTableViewCell.h"

@implementation CertificationTopViewTableViewCell{
    GLGWImageView * topImageView;
    GLGWLabel * resultsLabel;
    GLGWLabel * resouceLabel;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        topImageView = [[GLGWImageView alloc] initWithFrame:CGRectMake((KScreenWidth - kWidthProportion_In_iPhoneTriploid(60))/2, kHeightProportion_In_iPhoneTriploid(38), kWidthProportion_In_iPhoneTriploid(60), kHeightProportion_In_iPhoneTriploid(60)) inSuperView:self];
        topImageView.backgroundColor = kRandomColor;
        //
        resultsLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(0, kY_With_View(topImageView, 22), KScreenWidth, kHeightProportion_In_iPhoneTriploid(20)) theFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self];
        resultsLabel.text = @"您的企业身份认证审核中";
        resultsLabel.textAlignment = NSTextAlignmentCenter;
        //
        resouceLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(resultsLabel.x, kY_With_View(resultsLabel, 10), resultsLabel.width, resultsLabel.height) theFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#EC5353"] inSuperView:self];
        resouceLabel.text = @"证件不清晰";
        resouceLabel.textAlignment = NSTextAlignmentCenter;
    }
    return self;
}

-(void)setCellCertype:(CertificationType)cellCertype{
    _cellCertype = cellCertype;
    switch (_cellCertype) {
        case CertificationType_IntheRever:{
            resouceLabel.hidden = YES;
        }
            break;
        case CertificationType_Failure:{
            resouceLabel.hidden = NO;
            resultsLabel.text = @"您的企业身份认证未通过";
        }
            break;
        case CertificationType_Success:{
            resouceLabel.hidden = YES;
            resultsLabel.text = @"恭喜！您的企业身份认证成功";
        }
            break;
            
        default:
            break;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
